﻿CREATE TABLE [dbo].[DefinedEntitySubTypes] (
    [EntityType]        NVARCHAR (100) NOT NULL,
    [EntitySubType]     NVARCHAR (100) NOT NULL,
    [DefinedEntityName] NVARCHAR (255) NULL,
    [DefinedLookupName] NVARCHAR (255) NULL,
    CONSTRAINT [PK_DefinedEntitySubTypes] PRIMARY KEY CLUSTERED ([EntityType] ASC, [EntitySubType] ASC),
    CONSTRAINT [FK_DefinedEntitySubTypes_DefinedEntityTypes] FOREIGN KEY ([EntityType]) REFERENCES [dbo].[DefinedEntityTypes] ([EntityType]) ON UPDATE CASCADE
);





